home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / newlooklib.lha / newlook / setpalettebuttonpen.c < prev    next >
C/C++ Source or Header  |  1993-10-08  |  505b  |  26 lines

  1. /*
  2.  *  SETPALETTEBUTTONPEN.C
  3.  */
  4.  
  5. #include "newlook.h"
  6.  
  7. extern UWORD AddGadget( struct Window *, struct Gadget *, UWORD );
  8. extern VOID RefreshGList( struct Gadget *, struct Window *, struct Requester *, UWORD );
  9.  
  10. void SetPaletteButtonPen(w,g,pen)
  11. struct Window *w;
  12. struct Gadget *g;
  13. UBYTE pen;
  14. {
  15.   struct Border *b;
  16.  
  17.   if(b= (struct Border *)g->UserData)
  18.   {
  19.     USHORT pos= RemoveGadgetSafely(w,g);
  20.     b->FrontPen= pen;
  21.     if(pos!=0xFFFF)
  22.       AddGadget(w,g,pos);
  23.     RefreshGList(g,w,NULL,1L);
  24.   }
  25. }
  26.